//
//  User.m
//  CC
//
//  Created by Calvin.wang on 3/24/15.
//  Copyright (c) 2015 Calvin. All rights reserved.
//

#import "User.h"

@implementation User

-(User *) initWithName:(NSString *)name screenName:(NSString *)screenName profileImageUrl:(NSString *)profileImageUrl userType:(NSString *)userType city:(NSString *)city{
    if (self=[super init]) {
        self.name=name;
        self.screenName=screenName;
        self.profileImageUrl=profileImageUrl;
        self.userType=userType;
        self.city=city;
    }
    return self;
}

-(User *) initWithDictionary:(NSDictionary *)dic{
    if (self=[super init]) {
        [self setValuesForKeysWithDictionary:dic];
    }
    
    return self;
}

+(User *) userWithName:(NSString *)name screenName:(NSString *)screenName profileImageUrl:(NSString *)profileImageUrl userType:(NSString *)userType city:(NSString *)city{
    User *user = [[User alloc] initWithName:name screenName:screenName profileImageUrl:profileImageUrl userType:userType city:city];
    return user;
}
@end
